<?php
require_once('functions.php');
require_once("Connections/cnn.php");
session_start();

$ID = $_SESSION['memberID'];
$timezone = +7;
$time = gmdate("Y-m-d H:i:s", time() + 3600*($timezone+date("I")));

@$timelogout = mysql_query("UPDATE Members SET LastLogin = '{$time}' WHERE ID = '{$ID}'");

if($timelogout)
{
	echo "Successfull";
}


if(session_destroy())
{
	Redirect('login.php');
}
else
{
	RedirectMsg('Can not logout, it has some error','account.php');	
}
?>